package com.googlecode.stateless4j.delegates;

import com.googlecode.stateless4j.transitions.Transition;

/**
 * Use this in place of {@link Runnable} when the runnable needs access to the state transition.
 *
 */
public interface TransitionedRunnable<TState, TTrigger> extends Runnable
{

    /**
     * Called before Runnable.run().  Specifies the Transition that caused the Runnable to be executed.
     * 
     * @param transition Transition that caused the Runnable to be executed
     */
    public void setTransition(Transition<TState, TTrigger> transition);
}
